#ifndef __ARBRE_H__
#define __ARBRE_H__

#include "pile.h"

#define NB_FILS 4

/* DECLARATIONS DES TYPES POUR LES NOEUDS*/
#define TOPSTMTS 0
#define CLASS 1
#define HERIT 2
#define STMTS 3
#define IF 4
#define IFELSE 5
#define FOR 6
#define WHILE 7
#define AFFECT 8
#define RET 9
#define DEF 10
#define PARAM 11
#define ID 12
#define METH 13
#define APPEL 14
#define EXPR 15
#define STRING 16
#define FLOAT 17
#define INT 18
#define AND 19
#define OR 20
#define SI 21
#define SS 22
#define LEQ 23
#define GEQ 24
#define EQ 25
#define NEQ 26
#define ADD 27
#define SUB 28
#define MUL 29
#define DIV 30
#define CHARGER 31

/* FIN DES DECLARATIONS*/

struct noeud 
{
  int type_noeud;
  int type_var;
  int allocate;
  char * code;
  char * def;
  char * reg;
  char * nom;
  char * type_fonc;
  char * s;
  char * id;
  char * herite;
  int i;
  int arg;
  float f;
  struct noeud * fils[NB_FILS];
};

struct noeud * creerNoeud(int type, struct noeud * f0, struct noeud * f1, struct noeud * f2, struct noeud * f3);
void setString(struct noeud * n, char* s);
void setFloat(struct noeud * n, float f);
void setInt(struct noeud * n, int i);
void setID(struct noeud * n, char* id);
void setHerite(struct noeud * n, char* herite);


#endif
